package com.yonyou.cyxdms.sysmanage.client.feign;

import com.yonyou.cyx.framework.bean.dto.framework.RestResultResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(name = "${feign.dms.repair.name:channel-service}")
public interface CmsChannelClient {

    /**
     *  ============================省，市，县=======================================
     */


    /**
     * 根据省名字查询省信息
     * @param regionName 省名
     * @return String
     */
    @GetMapping("/region/getProvinceByNameLike")
    RestResultResponse<Map<String,String>> getProvinceByNameLike(@RequestParam("regionName") String regionName);


    /**
     * 根据城市名字And省id查询信息
     * @param cityName 市名
     * @param provinceId 省id
     * @return String
     */
    @GetMapping("/region/getCityByNameLike")
    RestResultResponse<Map<String,String>> getCityByNameLike(@RequestParam("cityName") String cityName,
                                                             @RequestParam("provinceId") Long provinceId);

    /**
     * 根据城市名字查询省名和code
     * @param cityName
     * @return
     */
    @GetMapping("/region/getProvinceByCityName")
    RestResultResponse<Map<String,String>> getProvinceByCityName(@RequestParam("cityName") String cityName);
}
